import { resultSuccess } from '../_util';

const routerList = [
  {
    path: '/dashboard',
    name: 'Dashboard',
    component: 'LAYOUT',
    redirect: '/dashboard/console',
    meta: {
      icon: 'DashboardOutlined',
      title: 'Dashboard'
    },
    children: [
      {
        path: 'console',
        name: 'dashboard_console',
        component: '/dashboard/console/console',
        meta: {
          title: '主控台',
          keepAlive: true
        }
      },
      {
        path: 'monitor',
        name: 'dashboard_monitor',
        component: '/dashboard/monitor/monitor',
        meta: {
          title: '监控页'
        }
      },
      {
        path: 'workplace',
        name: 'dashboard_workplace',
        component: '/dashboard/workplace/workplace',
        meta: {
          title: '工作台'
        }
      }
    ]
  },
  {
    path: '/system',
    name: 'System',
    component: 'LAYOUT',
    redirect: '/system/menu',
    meta: {
      icon: 'SettingOutlined',
      title: '系统管理'
    },
    children: [
      {
        path: 'menu',
        name: 'system_menu',
        component: '/system/menu/menu',
        meta: {
          title: '菜单管理',
          keepAlive: true
        }
      },
      {
        path: 'role',
        name: 'system_role',
        component: '/system/role/role',
        meta: {
          title: '角色管理',
          keepAlive: true
        }
      }
    ]
  },
  {
    path: '/form',
    name: 'Form',
    component: 'LAYOUT',
    redirect: '/form/basic-form',
    meta: {
      icon: 'ProfileOutlined',
      title: '表单页面'
    },
    children: [
      {
        path: 'basic-form',
        name: 'form-basic-form',
        component: '/form/basicForm/index',
        meta: {
          title: '基础表单'
        }
      },
      {
        path: 'complex-form',
        name: 'form-complex-form',
        component: '/form/complexForm/index',
        meta: {
          title: '复杂表单'
        }
      }
    ]
  }
];
export default [
  {
    url: '/getRouterList',
    timeout: 1000,
    method: 'get',
    response: () => {
      return resultSuccess(routerList);
    }
  }
];
